﻿@model _17bangMVC.Models.PlanModel
@{
    ViewBag.Title = "New";

    int[] days = new int[7];
    for (int i = 0; i < 7; i++)
    {
        days[i] = i;
    }

    int[] person = new int[5];
    for (int i = 0; i < 5; i++)
    {
        person[i] = i + 1;
    }
}

<style>
    .field-validation-error {
        color: red;
        font-size: 12px;
        display: inline-block;
        font: normal normal normal 14px/1 FontAwesome;
        font-size: inherit;
        text-rendering: auto;
        -webkit-font-smoothing: antialiased;
    }

        .field-validation-error::before {
            content: '\f119';
        }
</style>

<h2>发布新目标</h2>
<br />

@using (Html.BeginForm())
{
    <label><b>标题：（必填）</b></label>
    @Html.TextBoxFor(m => m.Title, new
{
    @class = "form-control",
    placeholder = "简明扼要，多个目标请分开发布"
});
    @Html.ValidationMessageFor(m => m.Title)
    <br />
    <label><b>详细说明:</b></label>
    @Html.TextAreaFor(m => m.SelfDescription, new
{
    @class = "form-control",
    placeholder = "补充说明你认为需要补充的其他信息。比如：求温柔/凶狠好心人，最好同城/校....."
});
    <br />
    <label><b>标签:（必填）</b></label>
    @Html.TextBoxFor(m => m.Label, new
{
    @class = "form-control",
    placeholder = "多个标签之间请用空格分开"
});
    @Html.ValidationMessageFor(m => m.Label)
    <br />
    <label><b>开始执行：（必填）</b></label>
    @Html.TextBoxFor(m => m.StartTime, "{0:D}", new
{
    @class = "form-control"
});
    <br />
    <label><b>目标结束：（必填）</b></label>
    @Html.TextBoxFor(m => m.EndTime, "{0:D}", new
{
    @class = "form-control",

});
    <br />
    <label><b>（每周）交作业时间：</b></label>
    <table class="table table-bordered">
        <tbody>
            <tr>
                <th>一</th>
                <th>二</th>
                <th>三</th>
                <th>四</th>
                <th>五</th>
                <th>六</th>
                <th>日</th>
            </tr>
            <tr>
                <td><input type="checkbox" name="DaysInWeek" value="1" checked=""></td>
                <td><input type="checkbox" name="DaysInWeek" value="2" checked=""></td>
                <td><input type="checkbox" name="DaysInWeek" value="3" checked=""></td>
                <td><input type="checkbox" name="DaysInWeek" value="4" checked=""></td>
                <td><input type="checkbox" name="DaysInWeek" value="5" checked=""></td>
                <td><input type="checkbox" name="DaysInWeek" value="6" checked=""></td>
                <td><input type="checkbox" name="DaysInWeek" value="7" checked=""></td>
            </tr>
        </tbody>
    </table>
    <br />
    <label><b>每周可请假：</b></label>
    @Html.DropDownListFor(m => m.Day, new SelectList(days), new
{
@class = "form-control"
});
    <label class="input-group-text">天</label>
    <br />
    <label><b>证明：</b></label>
    @Html.TextBoxFor(m => m.Prove, new
{
    @class = "form-control",
    placeholder = "简明扼要，多个目标请分开发布"
});
    <br />
    @Html.TextBoxFor(m => m.Prove, new
{
    @class = "form-control",
    placeholder = "可以访问的网址，详见说明"
});
    <br />
    <label><b>好心人最多：</b></label>
    @Html.DropDownListFor(m => m.Person, new SelectList(person), new
{
    @class = "form-control"

});
    <br />
    <label><b>未交作业罚金：（必填）</b></label>
    <br />
    <span class="input-group-text">$</span>
    @Html.TextBoxFor(m => m.BangMoney, new
{
    @class = "form-control",
    placeholder = "正整数，建议10枚以上"
});
    <span class="input-group-text">枚</span>
    @Html.ValidationMessageFor(m => m.BangMoney)
    <br />
    <button type="submit">提交</button>
    <label>
        @Html.CheckBoxFor(m => m.GoOn) 继续
    </label>
}

